import 'mapbox-gl/dist/mapbox-gl.css'
import './style'
import { setupCoreMap } from './core'
import { setupMapPosition } from './position'
import { setupMapLegend } from './legend'
import { setupMapLayer } from './layer'

export {
  type Layer,
  type SymbolStyle,
  type LineStyle,
  type FillStyle,
  type BaseSymbolLayerOption,
  type BaseLineLayerOption,
  type BaseFillLayerOption,
  type SymbolProperties,
  type LineProperties,
  type FillProperties,
  type SymbolFeature,
  type LineFeature,
  type FillFeature,
  type MapFeatures,
  BaseLayer,
  BaseSymbolLayer,
  BaseLineLayer,
  BaseFillLayer,
  SatelliteLayer,
  GeojsonSymbolLayer,
  GeojsonLineLayer,
  GeojsonFillLayer,
  GeojsonLayers,
  addLayer,
  symbolProperties,
  lineProperties,
  fillProperties,
  asSymbolFeature,
  asLineFeature,
  asFillFeature,
  makeSymbolFeature,
  makeLineFeature,
  makeFillFeature,
  centerOfMapFeatures,
  mergeMapFeatures,
  appendMapFeatures,
  changeMapFeaturesStyle,
  featureWithProperties,
  overlay
} from './layer'

export { registerMapLegend, type MapLegendEntry } from './legend'
export {
  setMapBearing,
  setMapCenter,
  setMapCenterIfNotContain,
  setMapPitch,
  setMapZoom
} from './position'

export async function setup() {
  await setupCoreMap()
  setupMapPosition()
  setupMapLegend()
  setupMapLayer()
}
